// package org.crate.query.api;
//
// import java.util.Map;
// import java.util.concurrent.*;
//
/// **
// * Created by huangfei on 2018/9/27.
// */
// public class MultithreadWriteService {
//
// static BlockingQueue<Map<String, String>> queue = new ArrayBlockingQueue<Map<String, String>>(10000);
// static ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
//
// static {
// while (true){
// try {
// Map<String, String> row = queue.poll(5, TimeUnit.SECONDS);
// if(row == null){
// continue;
// }
// } catch (InterruptedException e) {
// e.printStackTrace();
// break;
// }
// }
// }
//
// public static MultithreadWriteService inc(){
// return MultithreadWriteServiceClz.innerClass;
// }
//
// public boolean offer(Map<String,String> row) throws InterruptedException {
// return queue.offer(row,999999, TimeUnit.DAYS);
// }
//
// static class MultithreadWriteServiceClz {
// static MultithreadWriteService innerClass = new MultithreadWriteService();
// }
// }
